package com.xdb.sqlparser.ast.statement;

import com.xdb.sqlparser.ast.SQLName;
import com.xdb.sqlparser.ast.SQLStatement;
import com.xdb.sqlparser.ast.AbstractSQLStatementImpl;
import com.xdb.sqlparser.visitor.SQLAstVisitor;

public class SQLUseStatement extends AbstractSQLStatementImpl implements SQLStatement {

	private SQLName database;

	public SQLUseStatement() {

	}

	public SQLUseStatement(String dbType) {
		super(dbType);
	}

	public SQLName getDatabase() {
		return database;
	}

	public void setDatabase(SQLName database) {
		this.database = database;
	}

	@Override
	public void accept0(SQLAstVisitor visitor) {
		if (visitor.visit(this)) {
			acceptChild(visitor, database);
		}
		visitor.endVisit(this);
	}

}
